package code3;

import java.util.Random;

public class Zombie extends Actor {

	public Zombie() {
		super();
	}

	@Override
	public int go(City city) {
		// System.out.println(city.getDistance());
		Random random = new Random();
		int dis = city.getDistance();
		int count = 0;
		while (true) {
			speed = random.nextInt(6) + 3;
			// System.out.println(speed);
			dis -= speed;
			count++;
			if (dis <= 0)
				break;
		}
		return count;
	}

}
